package cn.openea.perpartner.componet.util;

import cn.openea.perpartner.common.auth.entity.LoginBody;
import lombok.extern.slf4j.Slf4j;

/**
 * @author Weird077
 * @description TODO
 * @date 2022-12-02 11:22
 */
@Slf4j
public class ThreadContext {
    private LoginBody loginUser;
    private String userId;
    private String userName;

    private String isAdmin ;

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }
    public void setUserName(String userName) {
        this.userName = userName;
    }

    public LoginBody getLoginUser() {
        return loginUser;
    }

    public void setLoginUser(LoginBody loginUser) {
        this.loginUser = loginUser;
        this.setUserId(loginUser.getUserid());
        this.setUserName(loginUser.getUsername());
    }

}
